﻿using System;
using System.Collections;
using System.IO;
using ARSys.Connector;
using ARSys.Entity;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using Wicresoft.Logger;
using Wicresoft.Task.EmployeeSync;
using Wicresoft.Task.Common;

namespace ARSys.Test
{


    /// <summary>
    ///This is a test class for SyncTaskTest and is intended
    ///to contain all SyncTaskTest Unit Tests
    ///</summary>
    [TestClass()]
    public class SyncTaskTest
    {


        private TestContext testContextInstance;

        /// <summary>
        ///Gets or sets the test context which provides
        ///information about and functionality for the current test run.
        ///</summary>
        public TestContext TestContext
        {
            get
            {
                return testContextInstance;
            }
            set
            {
                testContextInstance = value;
            }
        }

        #region Additional test attributes
        // 
        //You can use the following additional attributes as you write your tests:
        //
        //Use ClassInitialize to run code before running the first test in the class
        //[ClassInitialize()]
        //public static void MyClassInitialize(TestContext testContext)
        //{
        //}
        //
        //Use ClassCleanup to run code after all tests in a class have run
        //[ClassCleanup()]
        //public static void MyClassCleanup()
        //{
        //}
        //
        //Use TestInitialize to run code before running each test
        //[TestInitialize()]
        //public void MyTestInitialize()
        //{
        //}
        //
        //Use TestCleanup to run code after each test has run
        //[TestCleanup()]
        //public void MyTestCleanup()
        //{
        //}
        //
        #endregion


    

        /// <summary>
        ///A test for GetDbSource
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Wicresoft.Task.EmployeeSync.dll")]
        public void GetDbSourceTest()
        {
            SyncTask_Accessor target = new SyncTask_Accessor(); // TODO: Initialize to an appropriate value
            IEnumerable expected = null; // TODO: Initialize to an appropriate value
            IEnumerable actual;
            actual = target.GetDbSource(new ARSysContext(   ));
            Assert.AreEqual(expected, actual);
            Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for GetCsvSource
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Wicresoft.Task.EmployeeSync.dll")]
        public void GetCsvSourceTest()
        {
            //SyncTask_Accessor target = new SyncTask_Accessor(); // TODO: Initialize to an appropriate value
            //IEnumerable expected = null; // TODO: Initialize to an appropriate value
            //IEnumerable actual;
            //actual = target.GetCsvSource();
            //Assert.AreEqual(expected, actual);
            //Assert.Inconclusive("Verify the correctness of this test method.");
        }

        /// <summary>
        ///A test for Execute
        ///</summary>
        [TestMethod()]
        [DeploymentItem("Wicresoft.Task.EmployeeSync.dll")]
        public void ExecuteTest()
        {
            SyncTask_Accessor target = new SyncTask_Accessor(); // TODO: Initialize to an appropriate value
          
            IntervalTask task = target.Target as IntervalTask;
            task.Bag = new System.Dynamic.ExpandoObject();
            task.Bag.EmployeeSource = @"\\ws-fs-01\TempFolder\Employee.csv";
            task.Bag.SyncLimit = "0";
            task.Bag.BatchLimit = "1000";
            task.Bag.DefaultPwd = "User@123";
         
            target.Execute();
            Assert.Inconclusive("A method that does not return a value cannot be verified.");
        }
    }
}
